#ifndef PW_EXCEPTION_H_
#define PW_EXCEPTION_H_

#include "common.h"

#include "../include/exception.h"

namespace physicsworks {

namespace exception {

class IException : public virtual Exception {
private:
	std::string excMsg;
	
public:
	IException(const std::string& m) : excMsg(m) {}
	~IException() {}
	
	std::string msg() const {
		return excMsg;
	}
};

class IBodyAlreadyAdded : public BodyAlreadyAdded, public IException {
public:
	IBodyAlreadyAdded(const std::string& m) : IException(m) {}
	~IBodyAlreadyAdded() {}
};

class IBodyAnotherWorld : public BodyAnotherWorld, public IException {
public:
	IBodyAnotherWorld(const std::string& m) : IException(m) {}
	~IBodyAnotherWorld() {}
};

class IUnkownBody : public UnkownBody, public IException {
public:
	IUnkownBody(const std::string& m) : IException(m) {}
	~IUnkownBody() {}
};

class IWorldAlreadyAdded : public WorldAlreadyAdded, public IException {
public:
	IWorldAlreadyAdded(const std::string& m) : IException(m) {}
	~IWorldAlreadyAdded() {}
};

class IUnkownWorld : public UnkownWorld, public IException {
public:
	IUnkownWorld(const std::string& m) : IException(m) {}
	~IUnkownWorld() {}
};

class IWorldBodyAlreadyAdded : public WorldBodyAlreadyAdded, public IException {
public:
	IWorldBodyAlreadyAdded(const std::string& m) : IException(m) {}
	~IWorldBodyAlreadyAdded() {}
};

class IBadArg : public BadArg, public IException {
public:
	IBadArg(const std::string& m) : IException(m) {}
	~IBadArg() {}
};

}

}

#endif /*PW_EXCEPTION_H_*/
